import { Component } from '@angular/core'

@Component({
  selector: '{{selector}}',
  template: ` <ad-pagination
    [currentPage]="1"
    [pageSize]="50"
    [totalCount]="200"
    [selectedLength]="selectedLength"
    (pageChange)="pageChange($event)"
  >
    <!-- 操作按钮 -->
    <button mat-stroked-button size="mini" (click)="selectedLength = selectedLength - 1">-</button>
    <button mat-stroked-button size="mini" (click)="selectedLength = selectedLength + 1">+</button>
  </ad-pagination>`,
  styles: [],
})
export class DemoBasicComponent {
  selectedLength: number = 0
  constructor() {}
  pageChange(data) {
    console.log('分页器变更事件', data)
  }
}
